fix(test): remove duplicate on_file_select call causing flaky CI#314
Merged
esmuellert merged 1 commit intomainfrom Mar 7, 2026
Merged
fix(test): remove duplicate on_file_select call causing flaky CI#314esmuellert merged 1 commit intomainfrom
esmuellert merged 1 commit intomainfrom
Conversation
The unstage_hunk test called explorer.on_file_select() for the staged file immediately after open_codediff_and_wait(), but the explorer already auto-selects that same file on startup when all changes are staged. The two concurrent async git operations raced — on slower Windows/macOS CI runners the callbacks would interfere, leaving modified_revision unset and failing the assertion. Remove the redundant on_file_select() call and let the explorer's built-in auto-selection handle it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes flaky CI failure on Windows x64 and macOS ARM in
hunk_operations_spec.lua("unstage_hunk from staged view reduces hunk count").Root Cause
The test called
explorer.on_file_select()for the staged file immediately afteropen_codediff_and_wait(), but the explorer already auto-selects that same file on startup when all changes are staged. The two concurrent async git operations raced — on slower CI runners the callbacks would interfere, leavingmodified_revisionunset and failing the assertion.Changes
on_file_select()call in the testTesting
unstage_hunk from staged view reduces hunk counttest passes reliably